package com.yk.spark.service.manage.app.api;

import com.yk.spark.model.app.state.process.AppProcessState;
import com.yk.spark.model.app.state.action.AppActionState;
import org.json.JSONArray;
import org.json.JSONObject;

/**
 * Created by Limit on 2017/8/23.
 */
public interface IAppManageService {
//    /**
//     * 启动app
//     * @param appId app唯一标识
//     * @param input app输入
//     * @param output app输出
//     * @return app提交状态
//     */
//    AppActionState startApp(String appId, JSONArray input, String output);

    /**
     * 启动app
     * @param appId app唯一标识
     * @return app提交状态
     */
    AppActionState startApp(String appId);

    /**
     * 停止App
     * @param appId app唯一标识
     * @return app停止状态
     */
    AppActionState stopApp(String appId)throws Exception;

    /**
     * 查询App执行状态
     * @param appId app提交唯一标识
     * @return app执行状态
     */
    AppProcessState queryProcessState(String appId)throws Exception;

    /**
     * 查询App提交状态
     * @param appId app提交唯一标识
     * @return app提交状态
     * @throws Exception
     */
    AppActionState  querySubmitState(String appId) throws Exception;

}
